package pers.mobian.springfifth;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.SmartFactoryBean;
import org.springframework.stereotype.Component;
import pers.mobian.springfirst.firstTest.User;

/**
 * @Date 2021/7/14 20:15
 * @Created mobian
 * @Description
 */
@Component
public class Teacher implements SmartFactoryBean {
	@Override
	public Object getObject() throws Exception {
		return new User();
//		return new Teacher();
	}

	@Override
	public Class<?> getObjectType() {
		return User.class;
//		return Teacher.class;
	}

	@Override
	public boolean isEagerInit() {
		return true;
	}
}


